]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Reset source IDs to zero after removing them
authorMario Sanchez Prada <mario@endlessm.com>
Tue, 27 Jun 2017 09:09:16 +0000 (10:09 +0100)
committerMario Sanchez Prada <mario@endlessm.com>
Tue, 27 Jun 2017 09:10:40 +0000 (10:10 +0100)
There were some source IDs that were not being reset to zero when
removing the associated sources, resulting on some critical errors
being dumped when _realRecalculateWindowPositions() got called
after that point, via _delayedWindowRepositioning().

js/ui/workspace.js

index 11a65d6763df9308d663f516c9562772cb35864f..bcde53d3f2e4f095672c05c9dd3f408060fceeda 100644 (file)
@@ -1793,14 +1793,20 @@ const Workspace = new Lang.Class({
         global.screen.disconnect(this._windowEnteredMonitorId);
         global.screen.disconnect(this._windowLeftMonitorId);
 
-        if (this._repositionWindowsId > 0)
+        if (this._repositionWindowsId > 0) {
             Mainloop.source_remove(this._repositionWindowsId);
+            this._repositionWindowsId = 0;
+        }
 
-        if (this._positionWindowsId > 0)
+        if (this._positionWindowsId > 0) {
             Meta.later_remove(this._positionWindowsId);
+            this._positionWindowsId = 0;
+        }
 
-        if (this._actualGeometryLater > 0)
+        if (this._actualGeometryLater > 0) {
             Meta.later_remove(this._actualGeometryLater);
+            this._actualGeometryLater = 0;
+        }
 
         this._windows = [];
     },